<template>
  <div class="drawer-root">

    <div class="drawer-body" :style="{height: `calc(100% - ${$slots.footer ? 65 :0}px)`}">
      <slot name="body"></slot>
    </div>
    <div class="drawer-footer" v-if="$slots.footer">
      <slot name="footer"></slot>
    </div>
  </div>
</template>

<script>
export default {}
</script>

<style lang="scss" scoped>
@import "@/assets/style/businessTheme.scss";

.drawer-root {
  height: 100%;
  width: 100%;

  .drawer-body {
    height: calc(100% - 65px);
    width: 100%;
    padding: 20px;
    box-sizing: border-box;

    ::v-deep .el-date-editor {
      width: 100%;
    }

    ::v-deep .el-select {
      width: 100%;
    }
  }

  .drawer-footer {
    height: 65px;
    padding: 15px 20px;
    border-top: 1px solid rgba(228, 231, 237, 1);
    display: flex;
    justify-content: flex-end;
    box-sizing: border-box;

    ::v-deep .el-button {
      height: 32px;

      &.el-button--primary {
        background: $bt-color;
        border: none;
      }
    }
  }
}
</style>
